package com.example.rfidserver.pojo;

import java.util.Objects;

public class User {
    //身份证号属于长整型
    private long id;//
    private String r_id;//
    private int ticket_id;//
    private double integral_bill;//
    private int role;
    private int consume_id;

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", r_id='" + r_id + '\'' +
                ", ticket_id=" + ticket_id +
                ", integral_bill=" + integral_bill +
                ", role=" + role +
                ", consume_id=" + consume_id +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return id == user.id &&
                ticket_id == user.ticket_id &&
                Double.compare(user.integral_bill, integral_bill) == 0 &&
                role == user.role &&
                consume_id == user.consume_id &&
                Objects.equals(r_id, user.r_id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, r_id, ticket_id, integral_bill, role, consume_id);
    }

    public long getId() {
        return id;
    }

    public String getR_id() {
        return r_id;
    }

    public void setR_id(String r_id) {
        this.r_id = r_id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public int getTicket_id() {
        return ticket_id;
    }

    public void setTicket_id(int ticket_id) {
        this.ticket_id = ticket_id;
    }

    public double getIntegral_bill() {
        return integral_bill;
    }

    public void setIntegral_bill(double integral_bill) {
        this.integral_bill = integral_bill;
    }

    public int getRole() {
        return role;
    }

    public void setRole(int role) {
        this.role = role;
    }

    public int getConsume_id() {
        return consume_id;
    }

    public void setConsume_id(int consume_id) {
        this.consume_id = consume_id;
    }
}
